<?php
class My_URL extends URL {
	public static function app_url($path='', $use_fake_ext = true) {
		if($path == '' || substr($path,-1) == '/') $use_fake_ext = false; 
		if($use_fake_ext) return Kohana::config('app_config.base_url').$path.FAKE_EXT;
		else return Kohana::config('app_config.base_url').$path;
	}
	public static function cdn_url($path) {
		return Kohana::config('app_config.cdn_url').$path;
	}
	public static function removeFakeExt($data) {
		if(substr($data, 0 - strlen(FAKE_EXT)) == FAKE_EXT) {
			$data = substr($data, 0, strlen($data) - strlen(FAKE_EXT));
		}
		return $data;
	}
}